#ifndef GESTUREWALKTEST_H
#define GESTUREWALKTEST_H

#include "walktest.h"
#include <mlgesture.h>
#include <gestureobserver.h>
#include <QString>
#include "bullet.h"

class csPixmap;

class GestureWalkTest : public WalkTest, public mlgesture::GestureObserver
{
public:
    GestureWalkTest();
	virtual ~GestureWalkTest();
	virtual bool Initialize (int argc, const char* const argv[], const char *iConfigName);
	virtual void DrawFrame2D();
	virtual void MoveSystems (csTicks elapsed_time, csTicks current_time);
	virtual void LoadModels();
	virtual void shoot();

protected:
	void processEvent(mlgesture::GestureEvent *event);
	mlgesture::MLGesture *gesture_;
	iTextureManager* txtmgr_;
	bool gestureState_;
	int lastLx, lastLy;
	bool newInit_;
	bool goForward_;
	bool goBackward_;
	bool isShooting_;
	vector<QString> models;
	vector<csPixmap*> guns_;
	vector<int> bulletSpeed;
	vector<int> gunsAmmo;
	vector<int> maxGunsAmmo;
	int nextShoot_;
	int weaponNr_;
	vector<Bullet*> bullets_;
	csPixmap* scoreTex_[10];
	csPixmap* bulletIcon_;
	void loadScoreTexture();
	bool initGesture();

	int camId_;
	int lowHue_;
	int upperHue_;
	int lowValue_;
	int upperValue_;
	int trackingSensity_;
	bool readCfg();
};

#endif // GESTUREWALKTEST_H
